#include <iostream>

using namespace std;

int main()
{
    int pass_cnt = 0, outstand_cnt = 0;
    int n = 0;
    cin >> n;
    int tmp;
    for (int i = 0; i < n; i++)
    {
        cin >> tmp;
        if (tmp >= 60)pass_cnt++;
        if (tmp >= 85)outstand_cnt++;
    }
    double psss = pass_cnt * 1.0 / n, outstand = outstand_cnt * 1.0 / n;
    int pass_persent = psss * 100;
    tmp = (int)(psss * 1000) % 10;
    if (tmp > 4)pass_persent++;
    int outstand_persent = outstand * 100;
    tmp = (int)(outstand * 1000) % 10;
    if (tmp > 4)outstand_persent++;

    printf("%d%c\n", pass_persent, '%');
    printf("%d%c\n", outstand_persent, '%');
    return 0;
}